<!DOCTYPE html>
<html>
    <head>
        <meta http-equiv="Content-Type" content="text/html; charset=utf-8"/>
        <meta http-equiv="x-ua-compatible" content="ie=7" />
        <title>{$title}车型</title>
        <link href="{:C('WEB_URL')}Public/admin/style/base.css" rel="stylesheet" type="text/css" />
        <link href="{:C('WEB_URL')}Public/admin/style/master.css" rel="stylesheet" type="text/css" />
        <script type="text/javascript" src="{:C('WEB_URL')}Public/admin/js/jquery1.9.1.js"></script>
        <script type="text/javascript" src="{:C('WEB_URL')}Public/admin/js/base.js"></script>
    </head>
    <body>
        <div id="wrapper">
            <h2>{$title}车型<a href="javascript:history.go(-1)">返回</a></h2>
            <form action="{:U('save_model')}" method="post" id='myForm' enctype="multipart/form-data">
                <table class="form" >
                    <tr>
                        <td class="tkey w160">品牌：</td>
                        <td>
                            <select name="brand_id">
                               <volist name='auto' id='vo'>
                                    <option <eq name="vo.brand_id" value="$data['brand_id']">selected</eq> value="{$vo.brand_id}">{$vo.brand_name}</option>
                                </volist>
                            </select>
                        </td>
                    </tr>
                    <tr><td class="tkey">名称：</td><td><input value="{$data['model_name']}" type="text" name="model_name" class="inputText"  /></td></tr>
                    <tr><td class="tkey">排量：</td><td><input value="{$data['model_pl']}" type="text" name='model_pl' class="inputText" ></tr>
                    <tr><tr><td class="tkey">年份：</td><td><input value="{$data['model_year']}" type="text" name='model_year' class="inputText" ></tr></tr> 
					<tr><td class="tkey">机油量：</td><td><input value="{$data['capacity']}" type="text" name='capacity' class="inputText" >L</tr>
                   	<input type="hidden" name ='model_id' value="{$data['model_id']}">
                    <tr><td class="tkey"></td><td><input type="button" value="确定"  class="btnOrange"  /></td></tr>
                </table>
            </form>
        </div>
		<script type="text/javascript">
		 $(function(){
		  $(".btnOrange").click(function () {
		                $("input").each(function () {
		                    if ($(this).val() == "") {
		                        alert("不能为空！");
								$(this).focus();
								exit;
		                    }else{
								$("#myForm").submit();
							}
		                })
		            })
		 });
		</script>
    </body>
</html>